package com.aiyige.base.db.dao;

import android.util.Log;

import com.aiyige.base.db.DBHelper;
import com.aiyige.base.db.table.DownloadFile;
import com.aiyige.base.db.table.UploadFile;
import com.j256.ormlite.dao.Dao;

import java.sql.SQLException;

import timber.log.Timber;

/**
 * Created by zhuyakun on 2017/11/15.
 */

public class DownloadFileDao {
    public static final String TAG = DownloadFileDao.class.getSimpleName();
    public static Dao<DownloadFile, Integer> dao = null;

    public static Dao<DownloadFile, Integer> getDao() {
        if (dao == null) {
            try {
                dao = DBHelper.getInstance().getDao(DownloadFile.class);
            } catch (SQLException e) {
                Timber.e("getDao:" + Log.getStackTraceString(e));
            }
        }
        return dao;
    }
}
